<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>首页</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
<s:iterator value="pageBean.list"> 
<table border="1" width="100%">
<tr>

<td>
<table border="0" width="100%">
<tr >
<td width="100%"><br/>
<a href="<s:url action="MainShow" >
    <s:param name="messageId"><s:property value="messageId" /></s:param>
   </s:url>"><h3><s:property value="title" /></h3></a></td>
</tr>
<tr><td><br/><s:property value="content"  escape="false"/></td></tr>
<tr>
<td>
<hr/>
<table border="0" width="100%">
<tr>
<td width="20%"><a href="<s:url action="MainShow" >
    <s:param name="messageId"><s:property value="messageId" /></s:param>
   </s:url>">回复 </a></td>
   <td align="right" width="80%"><s:property value="submitTime" /></td>
</tr>
</table>


</table>
</td>
</tr>
</table>
<hr/>
</s:iterator>



        共<s:property value="pageBean.allRow"/> 条记录
        共<s:property value="pageBean.totalPage"/> 页
        当前第<s:property value="pageBean.currentPage"/>页<br/>
        
        <s:if test="%{pageBean.currentPage == 1}">
            第一页 上一页
        </s:if>
        <s:else>
            <a href="main.action?page=1">第一页</a>
            <a href="main.action?page=<s:property value="%{pageBean.currentPage-1}"/>">上一页</a>
        </s:else>
        <s:if test="%{pageBean.currentPage != pageBean.totalPage}">
            <a href="main.action?page=<s:property value="%{pageBean.currentPage+1}"/>">下一页</a>
            <a href="main.action?page=<s:property value="pageBean.totalPage"/>">最后一页</a>
        </s:if>
        <s:else>
            下一页 最后一页
        </s:else>
  </body>
</html>
